package com.njupt.service.impl;

import com.njupt.common.pojo.TaotaoResult;
import com.njupt.mapper.TbItemParamItemMapper;
import com.njupt.mapper.TbItemParamMapper;
import com.njupt.pojo.TbItemParam;
import com.njupt.service.ItemParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: XJL
 * @Description:
 * @Date: Create in 13:07 2018/5/28
 * @Modified By:
 **/
@Service
public class ItemParamServiceImpl implements ItemParamService {

    @Autowired
    private TbItemParamMapper tbItemParamMapper;

    @Override
    public TaotaoResult getItemParam(long id) {

        TbItemParam tbItemParam = tbItemParamMapper.selectByPrimaryKey(id);
        if (tbItemParam!=null){
            return TaotaoResult.build(200,"商品参数查询成功！",tbItemParam);
        }

        return TaotaoResult.build(500,"数据库错误！");
    }
}
